package org.xg.study.boot.common.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;

/**
 * @author CMG
 * @version 1.0
 * @cLassName UuidUtil
 * @description
 * @date 2021/8/26 9:13
 **/
public class UuidUtil {
    /**
     * 获取全局唯一id
     *
     * @return long
     */
    public static String getUuid() {
        Snowflake snowflake = IdUtil.getSnowflake(1, 1);
        return String.valueOf(snowflake.nextId());
    }
}
